<script lang="ts" setup>
import { getListByConditions } from '@/index';
import type { NdeTechnique } from '@/index.d';
import { useRequest } from 'vue-request';

const props = defineProps<{
  ndeMethod: 'pt' | 'mt' | 'rt' | 'ut' | 'ch';
  ndeCommissionId: number;
}>();

const { data } = useRequest(() =>
  getListByConditions<NdeTechnique>(`/technique/${props.ndeMethod}Technique`, {
    ndeCommissionId: props.ndeCommissionId
  })
);
</script>
<template>
  <el-option
    v-for="item in data"
    :key="item.id"
    :label="item.fullName"
    :value="item.fullName!"
    v-bind="$attrs"
  />
</template>
